package com.kehutong.payfees.dto;

import com.kehutong.payfees.enums.SuiteType;
import org.coraframework.orm.annotation.Column;

import java.time.LocalDateTime;

/**
 * <pre>
 * 应用使用者
 * </pre>
 * 
 * @author liuzhen (liuxing521a@163.com)
 * @createTime 2020年09月09日 上午9:43:38
 */
public class SuiteSetting extends KhtEntity {

	private static final long serialVersionUID = -70496797954415955L;

	protected SuiteSetting(String id) {
		super(id);
	}

	@Column(comment = "应用ID")
	private String appNo;

	@Column(length = 512, comment = "永久授权码")
	private String permanentCode;
	
	@Column(comment = "套件类型")
	private SuiteType type;

	@Column(length = 512, comment = "应用accessToken")
	private String accessToken; // suiteAccessToken 应用suite_access_token

	@Column(comment = "应用accessToken过期时间")
	private LocalDateTime accessTokenExpiredTime;
	
	// js调用权限
	@Column(length = 512, comment = "jsTicket")
	private String jsTicket;

	@Column(comment = "jsTicket过期时间")
	private LocalDateTime jsTicketExpiredTime;

	// app调用权限
	@Column(length = 512, comment = "appTicket")
	private String appTicket;

	@Column(comment = "appTicket过期时间")
	private LocalDateTime appTicketExpiredTime;

	public String getAppNo() {
		return appNo;
	}

	public void setAppNo(String appNo) {
		this.appNo = appNo;
	}

	public String getPermanentCode() {
		return permanentCode;
	}

	public void setPermanentCode(String permanentCode) {
		this.permanentCode = permanentCode;
	}

	public String getAccessToken() {
		return accessToken;
	}

	public void setAccessToken(String accessToken) {
		this.accessToken = accessToken;
	}

	public LocalDateTime getAccessTokenExpiredTime() {
		return accessTokenExpiredTime;
	}

	public void setAccessTokenExpiredTime(LocalDateTime accessTokenExpiredTime) {
		this.accessTokenExpiredTime = accessTokenExpiredTime;
	}
	

	public String getJsTicket() {
		return jsTicket;
	}

	public void setJsTicket(String jsTicket) {
		this.jsTicket = jsTicket;
	}

	public LocalDateTime getJsTicketExpiredTime() {
		return jsTicketExpiredTime;
	}

	public void setJsTicketExpiredTime(LocalDateTime jsTicketExpiredTime) {
		this.jsTicketExpiredTime = jsTicketExpiredTime;
	}

	public String getAppTicket() {
		return appTicket;
	}

	public void setAppTicket(String appTicket) {
		this.appTicket = appTicket;
	}

	public LocalDateTime getAppTicketExpiredTime() {
		return appTicketExpiredTime;
	}

	public void setAppTicketExpiredTime(LocalDateTime appTicketExpiredTime) {
		this.appTicketExpiredTime = appTicketExpiredTime;
	}
	
	public SuiteType getType() {
		return type;
	}

	public void setType(SuiteType type) {
		this.type = type;
	}

	@Override
	public boolean valid(LocalDateTime localDateTime) {
		return super.valid(localDateTime);
	}
}
